Network Information Service (NIS) is a standard developed to provide centralized information about network entities such as users, user groups, host computers, and services. A NIS server in the network stores information about these network entities and responds to queries from other computers. The inquiring computers are called NIS clients; their queries are NIS queries.
A NIS server runs a NIS process. The NIS process is responsible for responding to NIS queries and for reading stored NIS information to retrieve the information requested in the NIS queries. The NIS information on a NIS server is stored in one or more NIS maps.
Each NIS map is a table of entries that describes a set of the same type of network entities. Each entry in a NIS map describes a single network entity. Each entry is a key/value pair where the key is unique within the NIS map. The NIS process can search for a key within the NIS map and retrieve the value associated with a key. An example of a key/value pair is a computer host name associated with that host's Internet Protocol (IP) address.
One common example of a NIS map is named “hosts.byname”. It contains entries for all host computers defined in the network. Each entry contains a unique host computer name as the key associated with a value that is the computer's IP address. This NIS map allows the NIS process to search for a host computer's IP address by supplying the name of the computer. Other NIS maps contain entries for users, user groups, services, and other network entities.
A NIS map is stored on the NIS server in a format that the NIS process can read. This format varies depending on how the NIS process retrieves data from NIS maps. A NIS map is typically stored in a simple database on the NIS server where NIS entries are stored as database records. Traditional NIS maps are read-only: that is, the NIS process can read information from the NIS map but it can't change information in the NIS map.
A NIS map is usually generated from an entity text file, which is a human-readable file that describes a set of network entities. Entity text files are typically common files defined by the UNIX operating system such as the /etc/passwd file, the /etc/hosts file, and the /etc/services file. Each of these files has a defined format and contains a set of entries that each describe a network entity. The /etc/hosts file, for example, contains a set of user entries that each contain the host computer's name and the computer's IP address along with other information that defines that computer.
To generate a NIS map, a network administrator typically executes a computer script that reads an entity text file and converts information there into one or more NIS maps. The script extracts information appropriate for each NIS map, creates a set of key/value pairs, and then writes them as a new NIS map in the format appropriate for the NIS process. For example, a NIS map script reads the /etc/hosts file for information about host computers, then creates the NIS map hosts.byname. It contains key/value pairs that match host computer name with the computer's IP address.
Sometimes an entity text file provides information for two or more NIS maps. For example, a script can process the /etc/hosts file to create the hosts.byname NIS map and it can also process the same file to produce the hosts.byaddr NIS map. Hosts.byaddr permits the NIS server to respond to queries where the requester has a host's address and wishes to discover its name.
The NIS process does not use a newly generated NIS map until the network administrator or an administration process notifies the NIS process of the new map's availability.
When a network entity is created, modified, or deleted, the changes cannot be made directly to the read-only NIS maps on the NIS server. The changes are input instead into an entity text file used to generate NIS maps. A network administrator may enter the changes by hand, or an automated process may modify the entity text file.
Once the entity text file has been modified, the administrator or an executing script generates one or more new NIS maps from the file and then notifies the NIS process of the new maps' availability. The NIS process then uses the new NIS maps to retrieve information to respond to incoming NIS queries.
Many networks define thousands and thousands of network entities and require frequent entity information modification. Each set of modifications requires a change to the appropriate entity text files. Each of those text files must then be used to generate completely new NIS maps, which are stored in the NIS server and then, after the NIS process is notified, used to answer NIS queries. This process may require significant computing time and resources, often for insignificant changes in an entity definition.
As an example, consider a single host computer whose name has changed. To update the NIS server so that the new name is used to answer queries about the host computer, a network administrator or process must change the /etc/hosts file entry describing that host computer so that the entry contains the new computer name. After saving the revised text file, the administrator or process executes a script that reads the /etc/hosts file, containing thousands of entries, and generates a new hosts.byname NIS map. The administrator or process then notifies the NIS process of the locations of the new NIS map so the process will use it to serve revised information about the host computer's new name.
For a NIS server to provide the most up-to-date information for multiple NIS maps generated from multiple entity text files, these steps may occur daily or even hundreds, thousands, or more times each day. The frequency increases with the size of the network. And increasing network size also increases the number of entries processed each time a NIS map is updated.